/*
 * @Author: liuYang codkly@gmail.com
 * @Date: 2022-10-26 22:46:47
 * @LastEditors: liuYang codkly@gmail.com
 * @LastEditTime: 2023-02-17 16:48:50
 * @FilePath: \project_nodejsf:\code_blog\blog_web\composables\api.ts
 * @Description: 
 * 暂无备注
 */

import Http from '@/utils/http'


/**
首页 文章列表 分页 v2
*/
export const getArticlePageList = (params?: any) => {
    return Http.get(`/article/home/pageList`, params)
}
/**
首页 通知 v2
*/
export const getNotice = (params?: any) => {
    return Http.get(`/notice/home/list`, params)
}

/**
 * 热门文章 v1.1
*/
export const getArticleHotList = (params?: any) => {
    return Http.get(`/article/hot`, params)
}
/**
 * 文章详情 v1.1
*/
export const getDetail = (params: any) => {
    return Http.get(`/article/${params.id}`)
}
/**
 * 获取分类列表 v1.1
*/
export const getClassifyList = (params?: any) => {
    return Http.get(`/articleCategory`)
}
// 分类相关的 文章列表
export const getClassifyArticleList = (params?: any) => {
    return Http.get(`/article/classifyList`, params)
}


/**
 * 通知
*/
export const getNoticePageList = (params?: any) => {
    return Http.get(`/notice/pageList`, params)
}

//--------------------------------评论 
/**
 * 评论列表
 * */
export const getCommentList = (params?: any, server = true) => {
    return Http.get(`/comment/list`, params, server)
}
/**
 * 评论
 * */
export const getCommentAdd = (data?: any) => {
    return Http.post(`/comment/add`, data)
}
/**
 * 回复
 * */
export const commentReply = (data?: any) => {
    return Http.post(`/comment/reply`, data)
}



/**
获取友情链接
*/
export const getLink = (params?: any) => {
    return Http.get(`/links/list`, params)
}
/**
获取网站列表
*/
export const getLinks = (params?: any) => {
    return Http.get(`/link`, params)
}
// banner

export const getBanner = (params?: any) => {
    return Http.get(`/banner/home/list`, params)
}
/**
 * 获取md文档  友链  关于 等页面内容
 * */
export const getMD = (params?: any) => {
    // console.log('params-->', params)
    return Http.get(`/info/getMd`, params)
}

/**
获取左侧动态菜单
*/
export const getMenu = (params?: any) => {
    return Http.get(`/pages/list`, params)
}
export const getMenuDetail = (params?: any) => {
    return Http.get(`/pages/detail`, params)
}